# lock '3.4.0'
# set :git_strategy, Capistrano::Git::SubmoduleStrategy
set :application, 'my_project'
set :repo_url, 'git@gitlab.io-note.com:sunbow/my_project.git'
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
set :linked_files, %w{config/database.yml config/application.yml config/secrets.yml config/puma.rb}
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/download')
set :keep_releases, 5
set :rails_env, 'production'
namespace :deploy do
  after :publishing, :restart
  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
    # Here we can do anything such as:
    # within release_path do
    #   execute :rake, 'cache:clear'
    # end
    end
  end
  namespace :assets do
    # Rake::Task['deploy:assets:precompile'].clear_actions
  end
end